package com.weita.lightfood.controller;


import com.weita.lightfood.service.PushService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * description:
 *  消息推送
 * @author IT_Monster on 2019/8/18
 */
@RestController
@RequestMapping("/push")
@Api(tags = "消息推送接口")
public class PushController {

    @Autowired
    private PushService pushService;


    @ApiOperation("微信推送接口")
    @GetMapping("/weixin")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "openId", value = "用户openid", example = "00000"),
            @ApiImplicitParam(name = "formId", value = "小程序提交表单id", example = "00000")
    })
    public String weixinPush(@RequestParam String openId, @RequestParam String formId){
        return pushService.wechatPush(openId, formId);
    }

}
